Import Data

data <- read.csv("USA_GDP_Annual.csv")

Data Wrangling

data$Gross.domestic.product <- as.numeric(gsub("," ,"" , data$Gross.domestic.product))

Create Plotly Graphic

data %>%
  plot_ly() %>%
  add_lines(x = ~Year, y = ~Gross.domestic.product) %>%
  layout(title = "GDP by Year")